// test_scripts/prepare_upgrade.js
async function main() {
    const proxyAddress = '0x8B4D2b890dC13eabBb5632616145bee026F101a1';

    const LotteryV2 = await ethers.getContractFactory("Lottery");
    const box = await upgrades.upgradeProxy(proxyAddress, LotteryV2);
    console.log("Lottery upgraded address:", box.address);
}

main()
    .then(() => process.exit(0))
    .catch(error => {
        console.error(error);
        process.exit(1);
    });